# 8老师分2教室
import random
OfficeRoom = [[], [], []]
TeacherList = ["赵老师", "钱老师", "孙老师", "李老师", "周老师", "吴老师", "郑老师", "王老师"]
for TName in TeacherList:  # 老师随机分配办公室
    OfficeRoomNum = random.randint(0, 2)
    OfficeRoom[OfficeRoomNum].append(TName)
i = 0
while i < len(OfficeRoom):  # 打印三个办公室
    print(OfficeRoom[i])
    i += 1

# 第一题
my_str = 'a,hello'
Result1 = my_str.find('hello')
if Result1 == -1:
    print("不存在")
else:
    print("存在")

my_str = 'a,hello'
print(my_str.index('hello'))

# 第二题
my_strsplit = 'a,b,c,d'
print(my_strsplit.split(","))

# 第三题
my_strchange = '笔试题 123A'
print(my_strchange.replace("123", "进行中", 1))

# 第四题
while True:
    for i in range(11):
        print(i)

# 第五题
my_str1 = '「欢乐逛欢迎您」'
my_str5 = my_str1[0] + my_str1[-2:-8:-1] + my_str1[7]
print("%r" % my_str5)
